<template>
 <div>

<!--首页中的四大基本功能板块-->
  <!--      四个基本功能介绍并可以实现点击功能-->
  <el-row >
    <el-col :span="24">
      <div class="CoreContent">
        <div class="CoreTitle">
          核心业务
        </div>
        <div class="CoreDesc">
          操作简单，功能完善
        </div >
        <div style="width: 300px; margin: 0px auto;">
          <div class="el-divider--horizontal"></div>
        </div>
      </div>
    </el-col>
  </el-row>
  <el-row :gutter="20" style="margin-top: 70px;background: rgb(248,246,246)">
    <el-col :span="6" >
      <card :img-src="CardFreIcon" :title="CardTitleFre" :CardDesc="CardDescFre" @CardDescFreClick="CardClick"></card>
    </el-col>
    <el-col :span="6"> <card :img-src="CardAssoIcon" :title="CardTitleAssoc" :CardDesc="CardDescAssoc"></card></el-col>
    <el-col :span="6"> <card :img-src="CardFlusIcon" :title="CardTitleClu" :CardDesc="CardDescClu"></card></el-col>
    <el-col :span="6">
      <card :img-src="CardTongIcon" :title="CardTitleTon" :CardDesc="CardDescTon"></card>
    </el-col>
  </el-row>
 </div>
</template>

<script>
import card from "./Card";
export default {
  name: "BasicIntrouduce",
  components:{
    card
  },
  methods:{
    // 判断当前是否为手机还是电脑
    isMobile() {
      this.flag = navigator.userAgent.match(
          /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
      );
      console.log(this.flag);
      if(this.flag === null) {
        console.log("pc端");
        this.rightNavShow = true;
      }else {
        console.log("移动端");
        this.CardDescAssoc="关联分析说明见PC端"
        this.CardDescFre = "聚类分析说明见PC端"
        this.CardDescClu ="聚类分析说明见PC端"
        this.CardDescTon ="舌像分析说明见PC端"
      }
    },
    CardClick(evidence){
      // console.log("sssssssssssssssssssssss")
      // //指定跳转的地址
      // console.log(evidence)
      this.$emit("MainPageClick",evidence);
      // this.$router.replace('/FrequencyAnalysis')
    }

  },
  created: function () {
    this.isMobile()
  },
  mounted() {
    this.isMobile()
  },
  data(){
    return{
      CardFreIcon:require("../assets/freIcon.png"),
      CardAssoIcon:require("../assets/assoIcon.png"),
      CardFlusIcon:require("../assets/flusterIcon.png"),
      CardTongIcon:require("../assets/tongIco.png"),

      testsrc: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
      //菜单功能标题➕介绍
      CardTitleAssoc:"频次分析",
      CardDescAssoc:"将处方中单位药、药对、二元组的出现频次进行统计，并从大到小排序（单位药、药对、二元组用户可以自行选择）",
      CardTitleFre:"关联分析",
      CardDescFre:"可自主设置最小支持度计数阈值和最小置信阈值，依据Apriori关联分析算法生成强关联规则表和图",
      CardTitleClu:"聚类分析",
      CardDescClu:"可自主设置最小关联度阈值，生成按照关联度系数从大到小排序后的药物排名表或得到处方中核心药物组合表",
      CardTitleTon:"舌像分析",
      CardDescTon:"上传舌头图像，系统会根据分析病状并给出药物调理养生建议",
    }
  }
}
</script>

<style scoped>
.CoreContent{

  display: flex;
  flex-direction: column;
  text-align: center;
}
.CoreTitle{
  font-size: 38px;
  font-weight: 700;
}
.CoreContent{
  font-size: 20px;
  margin-top: 20px;
  color: #333;
}
.el-divider--horizontal{
  display: block;
  height: 1px;
  width: 100%;
  margin: 24px 0;
  left: 50%;
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
  position: absolute;
  background-color: #e0dbdb;
  padding: 0 20px;
  color: #303133;
}
</style>
